package com.tcm.core.service;


import com.tcm.core.domain.dto.AreasDTO;

import java.util.List;

public interface AreasService {

    /**
     * 获取一级子分类
     * @param parentId
     * @return
     * @throws Exception
     */
    List<AreasDTO> listSubAreas(Long parentId) throws Exception;

    /**
     * 查询分类数据
     * @param id
     * @return
     */
    AreasDTO findById(Long id);

    /**
     * 查询所有分类
     * @return
     * @throws Exception
     */
    List<AreasDTO> listAreas() throws Exception;

    /**
     * 转换为树形结构
     * @return
     * @throws Exception
     */
    List<AreasDTO> listToTree() throws Exception;

    /**
     * 递归查询子类
     * @param parentId
     * @param recursive
     * @return
     * @throws Exception
     */
    List<AreasDTO> listSubAreas(Long parentId, boolean recursive) throws Exception;


}
